1. Field of the Invention
The present invention relates to an apparatus and method for controlling a multi-functional machine tool which performs threading and machining operations other than threading, such as cutting.
2. Description of the Background Art
FIG. 4 shows the primary parts of a machine tool with a threading function, serving as a multi-functional machine tool for carrying out threading and other machining operations than threading, e.g., cutting. Referring to FIG. 4, a workpiece 1, having a pre-drilled hole 1A for threading, is held by a spindle 2 and is rotated. A cutting tool 3 is used for cutting the workpiece 1 as it is held and rotated by the spindle 2. The numeral 4 indicates a ballscrew, and 5 a threading tool moving motor for rotating the ballscrew 4 in a forward or reverse direction. A threading tool 7, described later, may be advanced or retracted via a screwed portion 4A of the ballscrew 4 and a threading tool driving motor 8, described later. An encoder 6 is directly coupled with the threading tool moving motor 5 for detecting the rotation value (angle) of the threading tool moving motor 5. The threading tool 7 includes a tap 7A, and the threading tool drive motor 8 rotates the tap 7A. An encoder 9 is directly coupled with the driving motor 8 for detecting the rotation value of the drive motor 8.
Fitted within the threading tool 7 at its end, and adjacent the threading tap 7A, to provide a floating tap type, is a spring that is reciprocatively movable back and forth in an axial direction. Driven by the moving motor 5, the threading tool 7 advances toward the workpiece 1. When the end of the tap 7A makes contact with the pre-drilled hole 1A in the workpiece 1, the tap 7A is rotated by the drive motor 8 and the threading tool 7 then advances into the pre-drilled hole 1A of the workpiece 1 automatically, thus threading the workpiece 1. The tap 7A retracts when the drive motor 8 is rotated in an opposite direction.
FIG. 5 is a block diagram that illustrates sections for controlling the threading tool 4 in a machine tool control apparatus known in the art for drive-controlling the machine tool shown in FIG. 4. Referring to FIG. 5, a programmable controller 20 is used for sequence-controlling the machine tool through the execution of a sequence program. The controller 20 will output a threading tool motion start command S7 for advancing the threading tool 7 when it receives a threading process start command S1. Then, the controller will output a threading start command S12 for initiating threading by means of the threading tool 7 when receiving a threading tool motion completion signal S11.
A motion controller 30 is operative to create and output the operation pattern of the threading tool 7. The controller 30 comprises a threading tool moving positioning pattern creating section 31 for creating a positioning pattern that starts the threading tool 7 and positions the end of the tap 7A with respect to the workpiece 1 on receipt of the threading tool motion start command S7 from the programmable controller 20. Section 31 outputs the threading tool moving positioning pattern together with a tool positioning command S8. The controller 30 also contains a positioning pattern creating section 32 for creating a positioning pattern of the tap 7A and specifying the depth of threading into the workpiece 1 by the threading tool 7. The controller 30 is operative to engage sections 31 and 32 on receipt of the threading start command S12 and to output the positioning pattern together with a positioning command S13.
A drive controller 40 is operative for drive-controlling the threading tool moving motor 5 and is equipped with a position controller 41 for carrying out position control during the threading movement. For example, it controls the advance and retraction of the threading tool 7 by driving the threading tool moving motor 5 on receipt of the positioning command S8 and will exercise a negative feedback control of the motor 5 on receipt of a signal S10 from the encoder 6. When the movement of the threading tool 7 is complete, the drive controller 40 outputs the tool movement completion signal S11 to the programmable controller 20. A drive controller 50 is designed for drive-controlling the threading tool drive motor 8 and is equipped with a position controller 51 for rotating the threading tool 7 in a forward and reverse directions and controlling the advance position, etc., of the tap 7A. Controller 50 also amplifies the positioning signal S13 entered, provides an output S15 to the threading tool drive motor 8, and drives the motor 8 on receipt of the positioning signal S13. Controller 50 also carries out the negative feedback control of motor 8 on receipt of a signal S5 output from the encoder 9, thereby threading the workpiece 1 along a predetermined depth.
FIG. 6 illustrates changes with time in the forward and reverse rotational velocities of the threading tool 7 driven by the drive motor 8 (the advance and retraction velocities of the tap 7A) and the rotational velocity of the spindle 2. The advance and retraction velocities of the tap 7A are proportional to the rotational velocities of the threading tool 7 of the floating type which advanceably and retractably rotates the tap 7A.
FIG. 7 is a flowchart indicating the four operation sequences of the machine tool control apparatus shown in FIG. 5, wherein the sequence A gives the operation of the programmable controller 20, the sequence B that of the motion controller 30, and the sequences C and D give those of the drive controllers 40 and 50, respectively.
The operation of the machine tool control apparatus will now be described in further detail. In the sequence A shown in FIG. 7, the programmable controller 20 is started up in step 200. The cutting of the workpiece 1 held by the spindle 2, for example, is finished in step 201. Then, the threading process start signal S1 is entered in step 202, and whether the spindle 2 has stopped rotating or not is checked in step 203. When it has been confirmed that the spindle 2 has stopped rotating, the threading tool movement start command S7 is output to the motion controller 30 in step 204. When the threading tool movement start command S7 is input in step 211 of the sequence B, the motion controller 30 checks whether this command has been entered or not in step 212. If it is confirmed that the command has been entered, the motion controller 30 creates a tool moving positioning pattern in the threading tool moving positioning pattern creating section 31 in step 213, and outputs to the position controller 41 of the drive controller 40 in step 214 the tool moving positioning pattern information together with the positioning command S8 for tool movement.
The tool moving positioning signal S8 is input into step 221 of the sequence C. As a result, the position controller 41 in the drive controller 40 checks whether this signal has been entered in step 222. If it has been checked that the signal has been entered, the position controller 41 executes position control in the movement of the threading tool 7 in step 223, i.e., advances the threading tool 7 toward the workpiece 1 according to the tool moving positioning pattern and brings the tap 7A into contact with the pre-drilled hole 1A in the workpiece 1. When the position control of the threading tool 7 is complete, the position controller 41 outputs the threading tool movement completion signal S11 to the programmable controller 20 in step 224, and sequence C ends at step 225.
The signal S11 is input in step 205 of the sequence A. As a result, the programmable controller 20 checks whether this signal S11 has been entered or not in step 206. If it is confirmed that the signal has been entered, then the programmable controller 20 outputs the threading start command S12 to the positioning pattern creating section 32 of the motion controller 30 in step 207. The sequence A ends at step 208.
When the threading start command S12 is input in step 215 of the sequence B, the positioning pattern creation section 32 of the motion controller 30 checks whether the command S12 has been entered or not in step 216. If it is confirmed that the command has been entered, the positioning pattern creating section 32 creates the positioning pattern of the threading tool 7 in step 217 in accordance with pre-entered parameters such as threading tool advance velocity, threading tool retraction velocity, acceleration and deceleration times, and threading depth (rotation value, thread pitch). In addition, section 32 outputs to the position controller 51 of the drive controller 50 the positioning pattern information together with the threading tool positioning command S13 in step 218. When the positioning pattern information and positioning command S13 are input in step 231, the position controller 51 of the drive controller 50 checks whether the information and command have been entered or not in step 232 of FIG. 7 sequence D. If it is confirmed that they have been entered, the position controller 51 controls the threading of the workpiece 1 to the predetermined depth and pitch in accordance with the positioning pattern information in step 233, and the sequence D ends at step 234.
The positioning pattern information comprises information on the changes of the threading tool 7 rotational velocities with time during a period of threading time T2 in FIG. 6. This is indicated by threading tool 7 rotational velocities V2 and V3 in a vertical axis and by threading tool 7 acceleration time TA2, deceleration time TD2, etc., in a horizontal axis. Namely, since the tap 7A provided in the threading tool 7 forms a floating structure wherein it is rotated by the threading tool 7 and reciprocatively movable in an axial direction, the forward rotation of the threading tool 7 at the rotational velocity V2 with the tap 7A in contact with the pre-drilled hole IA of the workpiece 1 causes the tap 7A to be rotated and to advance, cutting threads in the pre-drilled hole 1A of the workpiece 1. This advance velocity of the tap 7A is directly proportional to its rotational velocity employing the thread pitch as a constant. Accordingly, area D obtained from time t and threading tool 7 rotational velocity V2 or V3 in FIG. 6 indicates the threading depth in the workpiece 1.
When the positioning pattern information created by the positioning pattern creating section 32 of the motion controller 30 in accordance with the pre-entered parameters required for threading, e.g., threading tool 7 advance and retraction velocities, acceleration and deceleration times, and threading depth, is entered into the drive controller 50, a deviation signal between the positioning pattern information and the output signal of the encoder 9 is amplified by the position controller 51 in the drive controller 50. Also, the motor 8 is controlled according to the output S15 of the position controller 51, the threading tool 7 is driven via the motor 8, and the workpiece 1 is threaded to the predetermined depth by the tap 7A.
In the machine tool having a threading function as shown in FIG. 4, for example, the workpiece 1 is cut in the cutting process at a high spindle 2 rotational velocity (for example, 10,000 rpm), as indicated by the rotational velocity V1 in FIG. 6. In preparation for a subsequent threading process, the spindle 2 is brought to a stop during deceleration period TD1. This is followed by a brief communication period during which a process of FIG. 7, beginning at step 203, is conducted. When the threading operation begins at step 215 and while it continues for period T2, the threading tool 7 is advanced to bring the tap 7A into contact with the pre-drilled hole 1A of the workpiece 1, and the workpiece 1 is threaded at a low rotational velocity (for example, 100 to 200 rpm), as indicated by V2 (advance) in FIG. 6. Being of the floating type, the threading tool 7 advances automatically while rotating (in the forward direction). That is, in the threading operation, the spindle 2 reaches the constant rotational velocity V2 in the acceleration time TA2, is maintained at velocity V2 and then is brought to a stop in the deceleration time TD2. After a brief pause, the retract operation, which follows an acceleration to velocity V3 and then deceleration to zero, is conducted. Finally, following a second, communication period, the spindle speed is raised from zero to V1 during period TA1.
In the conventional design, it is necessary for the machine tool to stop the workpiece 1, which is rotating at high speed for the machining operation, before performing the threading operation. When the cutting and threading processes are scheduled alternately, the spindle must repeat fast rotation and stop. As a result, "tact time" is increased by a substantial "loss time". In the preferred embodiment, the loss time is equivalent to a sum of the spindle deceleration time TD1 and spindle acceleration time TA1.
When the cutting and threading of the workpiece held by the spindle are repeated alternately in the conventional machine tool control apparatus constructed as described above, the spindle rotating at high speed must be brought to a stop before carrying out threading, and after the threading is finished, the spindle must be rotated at high speed again, resulting in relatively long "tact time".